//
// Created by zhanggang on 24-5-25.
//

#ifndef SWITCH_DEMO_H
#define SWITCH_DEMO_H
//switch
inline void switch_demo() {
    int num1;
    cout << "请输入一个数字" << endl;
    cin >> num1;
    switch (num1) {
        case 1:
            cout << "num1等于1" << endl;
            break;
        case 2:
            cout << "num1等于2" << endl;
            break;
        case 3:
            cout << "num1等于3" << endl;
            break;
        default:
            cout << "num1不等于1，2，3" << endl;
            break;
    }
}
#endif //SWITCH_DEMO_H
